const EnvVariable = {
  typeOfFile : {
    tutorial: 'html',
    code: 'cc'
  },
  tempCodeUrl : (fileName) => `/ns-3-dev/scratch/${fileName}.cc`,
  runEnv : '/ns-3-dev',
  tempFileName : 'temp',
};

const LogConfig = {
  appenders: {
    infoLogs: {
      type: 'dateFile',
      filename: '/logs/info/info',
      pattern: '.yyyy-MM-dd',
      alwaysIncludePattern: true
    },
    errorLogs: {
      type: 'dateFile',
      filename: '/logs/error/error',
      pattern: '.yyyy-MM-dd',
      alwaysIncludePatternL: true
    },
    runLogs: {
      type: 'dateFile',
      filename: '/logs/run/run',
      pattern: '.yyyy-MM-dd',
      alwaysIncludePatternL: true
    }
  },
  categories: {
    default: { appenders: ['infoLogs'], level: 'INFO'},
    err: { appenders: ['errorLogs'], level: 'ERROR'},
    run: { appenders: ['runLogs'], level: 'INFO'}
  }
};

const containerConfig = {
  curNumber: 2, // 初始1个可使用，根据并发数动态调整
  totalNumber: 3,
  containersList: [
    // order isBusy host port api
  ],
  hostList: [
    // '10.244.0.23',
    // '10.244.0.24'
    web1,
    web2
  ],
  port: 8000
};

const waitTime = {
  waiting: 3000,
  runing: 100,
  finished: 0
}

module.exports = {
  EnvVariable,
  LogConfig,
  containerConfig,
  waitTime
}